package com.yyq.edumsm.utils;

import java.util.Random;

/**
 * @author yyq
 * @create 2021-04-28 10:21
 */
public class RandomUtils {
    public static String getFourRandomNum(){
        String NUMBER_CHAR = "0123456789";
        StringBuffer sb = new StringBuffer();
        Random random = new Random();
        for (int i = 0; i < 4; i++) {
            sb.append(NUMBER_CHAR.charAt(random.nextInt(NUMBER_CHAR.length())));
        }
       return sb.toString();
    }

}
